/**
* Copyright (c) By zengqh.
*
* This program is just for fun or demo, in the hope that it  
* will be useful, you can redistribute it and/or modify freely.
*
* Time: 2012/07/17
* File: App.h
* Blog: http://www.cnblogs.com/zengqh/
**/

#ifndef App_h__
#define App_h__

#include <windows.h>
#include "../RenderFrame/Device/RF.h"

class App : public FrameListener, public OIS::MouseListener, public OIS::KeyListener
{
public:
	App();
	~App();

	void Initalize();
	void Loop();
	void UnInitialize();

	void setupContent();

	bool frameStarted(const FrameEvent& frameEvent);
	bool frameEnded(const FrameEvent& frameEvent);

	bool mouseMoved(const OIS::MouseEvent &arg);
	bool mousePressed(const OIS::MouseEvent &arg, OIS::MouseButtonID id);
	bool mouseReleased(const OIS::MouseEvent &arg, OIS::MouseButtonID id);

	bool keyPressed(const OIS::KeyEvent &arg);
	bool keyReleased(const OIS::KeyEvent &arg);

protected:
	Device*					_device;
	SceneManager*			_scene_mgr;
	RenderSystem*			_render_system;
	InputSystem*			_input_system;
	CameraSceneNode*		_camera;
	f32						_move_distance;
};
#endif    /* App_h__ */